{% extends 'base.html' %}
{% block title %}
详情页
{% endblock %}
{% block context %}
<div class="cl-artical-content">
                <h2 class="cl-artical-title">{{ article.title }}</h2>
                <div class="cl-card-tag">
                    <div><span>{{ article.total_views }}</span>人浏览 / <span>3</span>人评论<span>{{ article.create_time }}</span></div>
                </div>
                <div class="cl-artical">
                   <img  src="{{ article.avatar.url }}" width="800" height="1250" class="img-fluid" alt="" align="center"></a>

                   {{ article.content | safe}}
                </div>
            </div>




            <div class="recommend-panel">
                <h4 class="right-card-title">相关文章</h4>
                <div class="card-deck">

                    {% for foo in create %}
                        <div class="card ll-panel">
                            <a class="recommend-panel-link" href="{% url 'home:details' %}?artid={{ foo.id }}">
                                <div class="recommend-panel-top">
                                    <img src="{{ foo.avatar.url }}" class="img-fluid" alt="">
                                </div>
                                <div class="recommend-panel-bottom">
                                   {{ foo.title }}
                                </div>
                            </a>
                        </div>
                    {% endfor %}








{#                    <div class="card ll-panel">#}
{#                        <a class="recommend-panel-link" href="details.html">#}
{#                            <div class="recommend-panel-top">#}
{#                                <img src="../static/temporary-img/list-image2.jpg" class="img-fluid" alt="">#}
{#                            </div>#}
{#                            <div class="recommend-panel-bottom">#}
{#                                高点击率钻展，设计环节…#}
{#                            </div>#}
{#                        </a>#}
{#                    </div>#}
{#                    <div class="card ll-panel">#}
{#                        <a class="recommend-panel-link" href="details.html">#}
{#                            <div class="recommend-panel-top">#}
{#                                <img src="../static/temporary-img/list-image3.jpg" class="img-fluid" alt="">#}
{#                            </div>#}
{#                            <div class="recommend-panel-bottom">#}
{#                                无敌配色技巧（一）#}
{#                            </div>#}
{#                        </a>#}
{#                    </div>#}
                </div>
            </div>
            <div class="comment">


                <form class="cl-comment-from" method="post">
                    {% csrf_token %}
                    <input type="hidden" name="art_id" value="{{ article.id }}">
                    <div><textarea placeholder="说点什么吧..." rows="5" name="content"></textarea></div>
                    <button type="submit">留言</button>
                    <span class="clearfix"></span>
                </form>



                <h4 class="right-card-title">全部评论</h4>
                {% for comm in comm %}
                    <div class="comment-panel">
                        <div class="comment-panel-portrait">
                            <img src="{{ comm.user.avatar.url }}" class="img-fluid rounded-circle" alt="">
                        </div>
                        <div class="comment-panel-content">
                            <div class="comment-panel-content-item">
                               <div class="comment-author">{{ comm.user.username }}</div>
                                <div>{{ comm.created_time }}</div>
                            </div>
                            <div class="comment-panel-content-main">{{ comm.content }}</div>
                        </div>
                        <span class="clearfix"></span>
                        <div class="text-primary"><a href="">回复</a></div>
                    </div>
                {% endfor %}
            </div>
{% endblock %}